package TestPractice;

import org.junit.Test;

/**
 * @author Jiang Zhiyan
 *
 * 2021年6月8日 下午9:01:32
 *
 */
public interface InterfaceTest {
	@Test
	public default void faceTest() {
		java.util.List<A> list = new java.util.ArrayList<A>();
		 list.add(new B());
		list.add(new C());
		for (A a : list) {
		 a.x();
//		 a.y();
		 }
	}
		
}
interface A { void x(); }
class B implements A { public void x() {} public void y() {} }
class C extends B { public void x() {} } 
